package org.smart4j.framework.dwtest.并发.semaphore;

/**
 * Created by
 *
 * @author dw
 * @date 2018/02/01
 */
public class Main {
    public static void main(String[] args) {
        long a = System.currentTimeMillis();
        Driver driver = new Driver();
        for (int i = 0; i < 100; i++) {
            new Car(driver).start();
        }
        long b = System.currentTimeMillis();
        System.out.println(b - a);

        long c = System.currentTimeMillis();
        Driver driver2 = new Driver(10);
        for (int i = 0; i < 100; i++) {
            new Car(driver2).start();
        }
        long d = System.currentTimeMillis();
        System.out.println(d - c);
    }
}
